 
<!DOCTYPE html>
<html>
    <head>
        <title>send http</title>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        
        <script src="../../jquery/js/jquery-1.8.0.min.js"></script>
        <script src="../../jquery/js/jquery-ui-1.8.23.custom.min.js"></script>
        <link rel="stylesheet" type="text/css" href="../../jquery/css/theme/jquery-ui-1.8.23.custom.css" media="all">
        <script type="text/javascript">
            $(document).ready(function(){
                
                $("#sendreq").button();
                
                
                $("#sendreq").click(function(){
             
                    /*$.getJSON(
                             $("#urlsend").val(),
                             $("#requesttext").val(),
                             function(json){
                               console.info(json);
                              });*/
                    $.ajax({
                              type: "POST",
                              url: $("#urlsend").val(),
                              data: $("#requesttext").val()
                           
                              
                            }).done(function( msg ) {
                             // alert( "Data Saved: " + msg );
                              //console.info(msg);
                              try{
                               $("#response").val(JSON.stringify(msg));
                              }catch(e)
                              {
                               $("#response").val(msg);
                              }
                            });
                    
                    
                });
                
                
                
                
                
            });
            
            
        </script>
        
    </head>
    <body>
        
        <input id="urlsend" placeholder="url to send request"  value="http://localhost:8080/Contexto2/Facade" ></input>
        <br/>
        <textarea id="requesttext" placeholder="insert here json" cols="80" rows="20" ></textarea>
        <br/>
        <button id="sendreq" value="send request....">send request....</button>
        <br/>
        <hr/>
        <textarea id="response" placeholder="here put response the server" cols="80" rows="50"></textarea>
        
        
    </body>
</html>
